{{- with .Site.Params.docsearch }}
    {{- $params := .Site.Params -}}
    {{- $options := dict "targetPath" "assets/docsearch/bundle.min.js" "minify" hugo.IsProduction "params" . -}}
    {{- $script := resources.Get "docsearch/js/index.ts" | js.Build $options | fingerprint -}}
    <script data-precache src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{- end -}}
